//
//  XLGUpdateSession.m
//  etionLib
//
//  Created by wu jingxing on 12-7-3.
//  Copyright (c) 2012年 GuangZhouXuanWu. All rights reserved.
//

#import "XLGUpdateSession.h"

#import "XLGUpdateSessionInternal.h"

@interface XLGUpdateSession ()

@end

@implementation XLGUpdateSession

static XLGUpdateSessionInternal *s_updatesession;

+ (void)initUpdateSessionTimer
{
    if (s_updatesession == nil)
        s_updatesession = [XLGUpdateSessionInternal new];
}

+ (void)releaseUpdateSessionTimer
{
    [s_updatesession releaseUpdateSessionTimer];
    ReleaseObj(s_updatesession);
}

+ (void)resumeUpdateSessionTimer
{
    [s_updatesession initUpdateSessionTimer];
}

+ (void)suspendUpdateSessionTimer
{
    [s_updatesession releaseUpdateSessionTimer];
}

+ (void)updateSessionNow
{
    [s_updatesession addUpdateSessionTimer:nil];
}

+ (void)foregroundCheckSessionIsTimeoutAsyncCompletion:(void(^)(NSInteger nResult,BOOL bIstimeout))completion
{
    [s_updatesession foregroundCheckSessionIsTimeoutAsyncCompletion:completion];
}

@end
